const initialState = {
  // 详情页MakDown
  MackDownData: [],
  // 分享数据
  Share: {},
  // 主页右侧tab数据
  HomeRightListdata: [],
};

export default (state = initialState, { type, payload }: any) => {
  const newState = JSON.parse(JSON.stringify(state));
  switch (type) {
    // 详情页MakDown
    case "MACKDOWNLOCATION":
      newState.MackDownData = payload.content;

      return newState;
    //分享数据
    case "SHARE":
      newState.Share = payload;
      return newState;
    // 主页右侧tab数据
    case "HOMERIGHTLIST":
      newState.HomeRightListdata = payload;
      return newState;
    default:
      return newState;
  }
};
